local P = {}

function P:Evaluate(normalTime)
    local x = self.xCurve:Evaluate(normalTime);
    local y = 0;
    if self.enableYCurve then
        y = self.yCurve:Evaluate(normalTime);
    end
    local z = self.zCurve:Evaluate(normalTime);

    return Vector3.New(x, y, z);
end

function P:EvaluateNoAlloc(outP, normalTime)
    local x = self.xCurve:Evaluate(normalTime);
    local y = 0;
    if self.enableYCurve then
        y = self.yCurve:Evaluate(normalTime);
    end
    local z = self.zCurve:Evaluate(normalTime);

    outP:Set(x, y, z);
end

return P